package com.filmbooks.model.book.tabs;

import com.filmbooks.api.DoubanApi;
import com.filmbooks.contract.book.BookCustomContract;
import com.filmbooks.model.home.bean.book.BookListBean;
import com.zyw.horrarndoo.sdk.base.BaseModel;
import com.zyw.horrarndoo.sdk.helper.RetrofitCreateHelper;
import com.zyw.horrarndoo.sdk.helper.RxHelper;

import io.reactivex.Observable;

/**
 * Created by heshuxiang on 2018/3/6.
 * 描述：
 * 公司：盟将威
 * 作者：heshuxiang
 * 日期：2018/3/6.
 * 工程：FilmBooks
 * 包：com.filmbooks.model.book.tabs
 */

public class BookCustomModel extends BaseModel implements BookCustomContract.IBookCustomModel {
    public static BookCustomModel newInstance() {
        return new BookCustomModel();
    }

    @Override
    public Observable<BookListBean> getBookListWitchTag(String tag, int start, int count) {
        return RetrofitCreateHelper.createApi(DoubanApi.class, DoubanApi.HOST).getBookListWithTag(tag, start, count).compose(RxHelper.<BookListBean>rxSchedulerHelper());
    }
}
